#include "mainwindow.h"
#include "ui_mainwindow.h"
#include <QLabel>
#include <QProgressBar>
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    QStatusBar* statusBar = this->statusBar();
    this->setStatusBar(statusBar);
    //statusBar->showMessage("这是一段马上消失文本",3000);

    QLabel* label = new QLabel("文本信息");
    statusBar->addPermanentWidget(label);

    QLabel* label2 = new QLabel("左侧label");
    statusBar->addWidget(label2,1);

    QProgressBar* progressBar = new QProgressBar();
    progressBar->setRange(0,100);
    progressBar->setValue(50);

    statusBar->addWidget(progressBar,1);


}

MainWindow::~MainWindow()
{
    delete ui;
}

